﻿Public Module AddTestSlides
    ' Add a few slides to the active presentation.
    Public Sub AddTestSlides()
        Dim p = Globals.ThisAddIn.Application.ActivePresentation

        Dim layout1 = p.Designs(1).SlideMaster.CustomLayouts(1)
        Dim layout2 = p.Designs(1).SlideMaster.CustomLayouts(2)

        Dim s As PowerPoint.Slide

        s = p.Slides.AddSlide(p.Slides.Count + 1, layout1)
        s.Shapes.Placeholders(1).TextFrame.TextRange.InsertAfter("Add Test Slides")

        s.Shapes.AddShape(Microsoft.Office.Core.MsoAutoShapeType.msoShapeRound1Rectangle, 120, 30, 130, 130)


        s = p.Slides.AddSlide(p.Slides.Count + 1, layout2)
        With s.Shapes.AddShape(Microsoft.Office.Core.MsoAutoShapeType.msoShapeArc, 210, 140, 190, 190)
            .Adjustments(1) = 180
            .Adjustments(2) = 144
            .Fill.Visible = True
            .Fill.Transparency = 0.3
            .Fill.ForeColor.SchemeColor = PowerPoint.PpColorSchemeIndex.ppAccent2
        End With

        With s.Shapes.AddShape(Microsoft.Office.Core.MsoAutoShapeType.msoShapeArc, 180, 140, 80, 80)
            .Adjustments(1) = 34
            .Adjustments(2) = -34
            .Fill.Visible = True
            .Fill.Transparency = 0.7
            .Fill.ForeColor.SchemeColor = PowerPoint.PpColorSchemeIndex.ppAccent1
        End With
    End Sub

End Module

